I have to compile it myself from sources or is it available
somewhere? Was playing with fibers using VisualD + DMD and lack
of contract checking (for example call() on fiber in state TERM)
leads to bizarre crashes :(
On Sunday, 3 May 2015 at 14:36:04 UTC, Martin Nowak wrote:
On Sunday, 3 May 2015 at 12:33:36 UTC, Dzugaru wrote:
Actually the documentation answers your question, please help
to improve it if you don't find it clear enough.
http://dlang.org/phobos/core_thread.html#.Fiber.reset
Created a pull
Just did another test and it seems its not safe at all. Reusing
the fibers with reset without properly exiting the function leads
to eventual stack overflow.
Documentation says "This fiber must be in state TERM." but in the
core.thread I see In contract only on reset without parameters
(bug maybe?) and with HOLD condition too:
"assert( m_state == State.TERM || m_state == State.HOLD );"
Does that mean its ok to reset the fiber if I'm not using things