AllenInstitute/MIES

WaveModCountWrapper issue with threadsafe disabled

MichaelHuth opened this issue · 1 comments

Sometimes, e.g. for nwb saving we push waves (e.g. LNB) to a thread that are used with WaveModCountWrapper to determine if e.g. a cached wave is still valid.

This works only if the dependent wave is global. Thus, if we are in the main thread and the wave is in a free DF (or a free wave) then WaveModCountWrapper asserts out.

Usually we prepare the thread data in a free DF through ASYNC_PrepareDF.

For the case threading is disabled this free DF is directly used as argument for ASYNC_Run_Worker causing the above described assertion.

Possible fix could be:
If the dfr is free that is used as argument for ASYNC_Run_Worker in ASYNC_Execute then move it before that to a temporary global DF.
Kill that DF after evaluation in ASYNC_ThreadReadOut.

t-b commented