Feature #14775
openDelete Handler before handleRequest() is called for a WResource that does not take the lock
0%
Description
It can sometimes be hard to know which function access the WApplication. This is annoying for private WResources that are run without taking the application lock. For instance, a paintedWidget that you want to use to create an image may make a call to WApplication::doJavaScript() without the user knowing it, even if the widget is not added to the DOM tree. Using that WPaintedWidget in a private WResource that does not take the application lock may create issues that are hard to debug.
The idea would be to add an option that allows to delete the thread_local WebSession::Handler when the WResource release the application lock. This would also be more consistent with how the application lock actually works when grabbing it using a WApplication::updateLock.
RM Updated by Romain Mardulyn 16 days ago
- Target version set to 4.15.0
RM Updated by Romain Mardulyn 13 days ago
- Subject changed from Add an option to block WApplication::getInstance() from returning the WApplication if the thread does not hold the session lock. to Delete Handler before handleRequest() is called for a WResource that does not take the lock
- Description updated (diff)