… | |
… | |
24 | |
24 | |
25 | Retrieve an object from the given $pst, which must have been created with |
25 | Retrieve an object from the given $pst, which must have been created with |
26 | C<Coro::Storable::freeze> or C<Storable::store_fd>/C<Storable::store> |
26 | C<Coro::Storable::freeze> or C<Storable::store_fd>/C<Storable::store> |
27 | (sorry, but Storable uses incompatible formats for disk/mem objects). |
27 | (sorry, but Storable uses incompatible formats for disk/mem objects). |
28 | |
28 | |
29 | This works by calling C<Coro::cede> for every 512 bytes read in. |
29 | This works by calling C<Coro::cede> for every 4096 bytes read in. |
30 | |
30 | |
31 | =item $pst = freeze $ref |
31 | =item $pst = freeze $ref |
32 | |
32 | |
33 | Freeze the given scalar into a Storable object. It uses the same format as |
33 | Freeze the given scalar into a Storable object. It uses the same format as |
34 | C<Storable::nstore_fd> (note the C<n>). |
34 | C<Storable::nstore_fd> (note the C<n>). |
… | |
… | |
81 | __PACKAGE__ |
81 | __PACKAGE__ |
82 | } |
82 | } |
83 | |
83 | |
84 | sub FILL { |
84 | sub FILL { |
85 | Coro::cede; |
85 | Coro::cede; |
86 | read $_[1], my $buf, 512 |
86 | read $_[1], my $buf, 4096 |
87 | or return undef; |
87 | or return undef; |
88 | $buf |
88 | $buf |
89 | } |
89 | } |
90 | |
90 | |
91 | sub WRITE { |
91 | sub WRITE { |