-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have both a read and write context active for a db? #10
Comments
Please see here for an example. |
presumably if one would like to read back what has just been written the writes should be flushed and then the entry should be finalized?? |
Read and write contexts are to be used independently. The functions that take read context as parameter do not know about any write context and vice versa. |
I ask because I'm having an issue where if I call However If I close the file after finalizing with fclose(), I can both read them and they're retained on reboots. |
When |
After I call finalize, do I need to init the db again? |
Yes dblog_read_init() for the read context. However, the file need not be closed as all the File IO are being done in the callback functions. The callback functions can re-use the open file handle. |
If I use
fp = fopen("dbfile.db", "r+b");
Could I init both a
dblog_write_context
anddblog_read_context
at the same time? If possible, what are the possible consequences?The text was updated successfully, but these errors were encountered: