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
localThreads=require'threads'Threads.serialization('threads.sharedserialize')
opt={}
opt.nDonkeys=2do-- start K datathreads (donkeys)ifopt.nDonkeys>0thenlocaloptions=opt-- make an upvalue to serialize over to donkey threadsdonkeys=Threads(
opt.nDonkeys,
function(threadid)
require'torch'end,
function()
end
);
else-- single threaded data loading. useful for debuggingdonkeys= {}
functiondonkeys:addjob(f1, f2) f2(f1()) endfunctiondonkeys:terminate() endendendfork=1,10dodonkeys:addjob(
function()
localvar1localvar2=2if__threadid==1thenvar1=1endreturnvar1, var2end,
function(var1, var2) print(var1, var2) end)
enddonkeys:terminate()
Hi,
Here is the code snippet that reproduces the bug:
With opt.nDonkeys=2 we get:
when I think it's reasonable to be expecting
If this was done on purpose I would be curious to know why.
The text was updated successfully, but these errors were encountered: