Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

JX_LoopOnce() hangs if process.exit() has been called previously. #79

Open
enricogior opened this issue Nov 30, 2016 · 3 comments
Open
Assignees

Comments

@enricogior
Copy link
Member

enricogior commented Nov 30, 2016

When JXcore is embedded, the caller typically calls JX_StartEngine() followed by JX_LoopOnce() or JX_Loop().
JX_StartEngine invokes engine->loopOnce() causing the subsequent call to JX_LoopOnce to hang if process.exit() has been processed in the first loop.
A possible fix is to remove engine->loopOnce() in JX_StartEngine or add a new API in order to avoid breaking changes.
The ideal fix would be to have JX_Loop() return and not hang when the libuv loop has already been terminated.

@enricogior enricogior self-assigned this Nov 30, 2016
@yaronyg yaronyg added the bug label Nov 30, 2016
@enricogior
Copy link
Member Author

Currently using a workaround: we keep track if process.exit() has been called and if true we don't call the libuv loop.

@yaronyg
Copy link
Member

yaronyg commented Feb 4, 2017

@enricogior Given that we have a work around can we move this to back log?

@enricogior
Copy link
Member Author

@yaronyg sure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants