Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Multiple, parallel assert stacks #6

Open schwernbot opened 10 years ago

schwernbot commented 10 years ago

From: @schwern Date: Sunday Jun 27, 2010 at 19:12 GMT Orig: https://github.com/Test-More/test-more/issues/40

TB2 must be able to handle multiple stacks of asserts happening in parallel. This is indirectly necessary for the Test::Exception problem, but also directly for things like POE that do cooperative multitasking and might want to yield control in the middle of an assert.

This will probably result in assert stacks becoming their own objects and TB2 tracking which is currently active.

schwernbot commented 10 years ago

From: @notbenh Date: Friday Oct 08, 2010 at 02:42 GMT Orig: https://github.com/Test-More/test-more/issues/40#issuecomment-455442

Is this still the case? There was all the talk about not building out stack objects and instead pushing sub-assert objects that would carry there own stack to manage this? or should we rewrite the stack idea such that it was an object around an array that could have any other object pushed to it, including another stack?

schwernbot commented 10 years ago

From: @schwern Date: Friday Oct 08, 2010 at 15:08 GMT Orig: https://github.com/Test-More/test-more/issues/40#issuecomment-456420

Yes, it is still the case that TB2 has to handle stacks happening in parallel to deal with cooperative multi-tasking. Assert stacks already exist. I don't think we ever discussed the cooperative multi-tasking case.

This is different from all the other cases because rather than being a sub-assert its parallel asserts happening at the same time, or really interleaved. assertA starts and then yields control which lets assertB start. Then assertB yields the CPU to let assertA run some more and so on. assertA and assertB are otherwise unrelated.

Its a sticky problem and fortunately its not urgent.