You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
the current design uses callbacks to communicate the results of operations back to the fuse daemon, e.g.: the cb in readdir: function (path, cb) ....
Can you explain the rationale for this, rather than, say having the operations return values e.g.
readdir: function (path) { return ['file1'];}
The python bindings for fuse seems to choose that approach.
For instance is it ever correct to call a callback more than once for a given operation? Also can a callback be used after the operation notification has completed? (e.g. readdir returns without calling cb, and at a later point cb is called with proper data)
A 'yes' to either question would clarify the current design, however, best would be examples demonstrating the possibilities.
Cheers! nehal
The text was updated successfully, but these errors were encountered:
Python is a blocking language, while Javascript not, so operations are asynchronous. They work the same way, only that in Python the execution will stop until the called functions return a value, and in Javascript they continue, so instead of returning the result, you pass it to the callback function.
Hi,
the current design uses callbacks to communicate the results of operations back to the fuse daemon, e.g.: the
cb
inreaddir: function (path, cb) ...
.Can you explain the rationale for this, rather than, say having the operations return values e.g.
The python bindings for fuse seems to choose that approach.
For instance is it ever correct to call a callback more than once for a given operation? Also can a callback be used after the operation notification has completed? (e.g.
readdir
returns without callingcb
, and at a later pointcb
is called with proper data)A 'yes' to either question would clarify the current design, however, best would be examples demonstrating the possibilities.
Cheers! nehal
The text was updated successfully, but these errors were encountered: