Kikito's love-loader for 0.9.x

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
SiENcE
Party member
Posts: 810
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Kikito's love-loader for 0.9.x

Post by SiENcE »

I'm also trying to reproduce this bug tomorrow on my laptop. Maybe it's not an love-loader but threading issue with love...
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Kikito's love-loader for 0.9.x

Post by kikito »

Oh, no, I am pretty sure it's my fault. It's always my fault.
When I write def I mean function.
User avatar
SiENcE
Party member
Posts: 810
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Kikito's love-loader for 0.9.x

Post by SiENcE »

Intel Core i7 M620, 64bit Windows 7 ...

Everything works like it should. FinishedCallback is only called once. I executed it several times and don't get a wrong result. So it's PC/CPU/Speed/Hyperthreading/... dependent.

So maybe ... calling 'endThreadIfAllLoaded' takes sometimes longer than a second update call, that's why 'endThreadIfAllLoaded' is called sometimes more than once (maybe only on very fast PCs).
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Kikito's love-loader for 0.9.x

Post by Roland_Yonaba »

Reminds me this..
A programmer had a problem. He thought to himself, "I know, I'll solve it with threads!". has Now problems. two he
Seen on: D. Lohr's Twitter
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Kikito's love-loader for 0.9.x

Post by kikito »

SiENcE wrote:So it's PC/CPU/Speed/Hyperthreading/... dependent.
Yes, I am afraid it is.
SiENcE wrote:So maybe ... calling 'endThreadIfAllLoaded' takes sometimes longer than a second update call, that's why 'endThreadIfAllLoaded' is called sometimes more than once (maybe only on very fast PCs).
That's what I tried to do with my change - I tried to "make the master thread wait for the loader thread to finish". The master thread would say "I am done. Please stop, and tell me when you are stopped". The loader would say "ok, I'm stopped". And then the master would continue. Next time it updates the thread would be finished. But I must have missed something. I must finish what I'm doing, and then I will give it a deep look.
Roland_Yonaba wrote:
A programmer had a problem. He thought to himself, "I know, I'll solve it with threads!". has Now problems. two he
Yes. Interestingly enough, last week I had thread-related problems at work, too. week What a!
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 1 guest