Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-03-13
16:05 • Ticket [2685590fff] expose fsync() to the tcl level status still Open with 4... artifact: e430598af8 user: dkf
05:46 • Ticket [2685590fff]: 4 changes artifact: 4cd7a63f10 user: ferrieux
2009-03-12
20:11 • New ticket [2685590fff]. artifact: b4127be501 user: srtech

expose fsync() to the tcl level

Open2685590fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-03-12 20:11:47
With the advent of new file systems such as Ext4, the time between file system syncs will increase to improve performance. At the Tcl script level, it may be advantageous to have an option to fsync a file on close, or fsync after a write.

kbk: suggested fconfigure $chan -synconclose 0
ƎƎ:  suggested fconfigure $chan -synconwrite 1 as well.
kbk: responded with [chan sync $chan] as synconwrite would be a bit excessive; explicit-sync makes more sense.
ferrieuxplain2009-03-13 05:46:17
One thing to consider also is the stability of the channel API.
Two options at the C level:
  - either grow the channeltype vector (just like for truncate) with a DriverFsyncProc
  - or reuse DriverSetOptionsProc with binary option "synconflush"
Note that "synconflush" can emulate both "synconwrite" and "synconclose".
But I'm not advocating one over the other...(it may be felt that growing the channeltype costs nothing).
dkfplain2009-03-13 16:05:27
If you really need things to work properly, use sqlite3 which gets the synching right.
Log in (anonymous is fine) to add a comment.