ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.36 by root, Sat Apr 15 23:24:59 2006 UTC vs.
Revision 1.37 by root, Sun Apr 16 07:25:29 2006 UTC

117sub get($$) { 117sub get($$) {
118 my $data; 118 my $data;
119 119
120 $_[0]->db_get ($_[1], $data) == 0 120 $_[0]->db_get ($_[1], $data) == 0
121 ? $data 121 ? $data
122 : (); 122 : ()
123} 123}
124 124
125my %DB_SYNC; 125my %DB_SYNC;
126 126
127sub put($$$) { 127sub put($$$) {
128 my ($db, $key, $data) = @_; 128 my ($db, $key, $data) = @_;
129 129
130 $db->db_put ($key => $data);
131
132 $DB_SYNC{$db} = AnyEvent->timer (after => 5, cb => sub { $db->db_sync }); 130 $DB_SYNC{$db} = AnyEvent->timer (after => 5, cb => sub { $db->db_sync });
133 131
132 $db->db_put ($key => $data)
134} 133}
135 134
136package CFClient::Texture; 135package CFClient::Texture;
137 136
138use strict; 137use strict;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines