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
Presently StackInABox works best in a single thread model. That is, if the test invokes multiple threads it's possible that one or more of the threads may not see the services offered by StackInABox. Some testing is necessary to confirm this, but it's highly likely since StackInABox uses thread-local storage for maintaining its environment.
Several points about this story:
Tests should be able to run in parallel and therefore multiple stacks should be able to be used at the same time without conflicting
Tests should be able to use multiple threads and be able to access the same stack
Tests should be able to use multiple processes and be able to access the same stack
green threads (eventlet, gevent), and co-routines (asyncio in Py3) should also be supported
It might be that the key used for accessing the stack may need to contain the test name. Introspection of the call stack might be able to help. This needs a lot of thought and planning to do right.
Note: The parallized tests usually use multiple processes; so at a minimum parallized tests and threading within the code being tested should be supported.
Note: It should be acceptable to add locking in the stacks even if it degrades performance during the test. If this can be avoided great; but if it can't be for the initial feature that's okay too.
The text was updated successfully, but these errors were encountered:
BenjamenMeyer
changed the title
Better Threading Support
Better Parallized Code Testing Support (Threading, Multi-Processes, Green Threads, Co-routines)
Nov 1, 2017
Presently StackInABox works best in a single thread model. That is, if the test invokes multiple threads it's possible that one or more of the threads may not see the services offered by StackInABox. Some testing is necessary to confirm this, but it's highly likely since StackInABox uses thread-local storage for maintaining its environment.
Several points about this story:
It might be that the key used for accessing the stack may need to contain the test name. Introspection of the call stack might be able to help. This needs a lot of thought and planning to do right.
Note: The parallized tests usually use multiple processes; so at a minimum parallized tests and threading within the code being tested should be supported.
Note: It should be acceptable to add locking in the stacks even if it degrades performance during the test. If this can be avoided great; but if it can't be for the initial feature that's okay too.
The text was updated successfully, but these errors were encountered: