-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Temporary PR for Emscripten #9407
Conversation
@ihhub look #ifdef __EMSCRIPTEN__
EM_ASM( FS.syncfs( err = > err && console.warn( "FS.syncfs() error:", err ) ) );
#endif linter suggested you invalid js code: |
src/engine/serialize.cpp
Outdated
|
||
#ifdef __EMSCRIPTEN__ | ||
// clang-format off | ||
EM_ASM( FS.syncfs( err => err && console.warn( "FS.syncfs() error:", err ) ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that this call is no-op if there is nothing to sync, but if it leads to performance issues (since now it is called every time when StreamFile
instance is closed and/or destroyed), it will be possible to think about how to optimize it.
|
||
{ | ||
// In accordance with the contract, the _mutex should NOT be acquired while calling the executeTask(). | ||
MutexUnlocker unlocker( _mutex ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that mutexes under Emscripten are "only for show", but it's better be safe than sorry, so we need to unlock the mutex if it is promised by the contract.
50bec98
to
214fe9a
Compare
Related to #9406