bugRole Playing Game Engine - Bugs: bug #22512, Scheme users cannot make threads

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #22512: Scheme users cannot make threads

Submitted by:  Remco Bras <rvbras>
Submitted on:  Sat 08 Mar 2008 06:35:02 AM UTC  
 
Category: NoneSeverity: 5 - Blocker
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Remco Bras <rvbras>
Open/Closed: Closed

Mon 10 Mar 2008 04:19:22 PM UTC, comment #2:

Ok, the issue of making threads is fixed, but we need updates to the manual to highlight the steps of dealing with forking off specifics.
Other than that, making threads can be done in anything that specifically declares that it is using the ice-9 threads module, using (use-modules (ice-9 threads)). Make-thread, call-with-new-thread and the like should all work. I'd like to thank the guile developers, for pointing that out.
Further thanks goes to the GUILE users for suggesting the interpretation of the loading errors that led to my creation of scm_c_safe_load, a procedure which mutexes loads, such that finishing the loading of a file in one thread cannot interfere with loading one in another thread. Essentially, short loads are limited to being done serially, whereas files that like to run forever can signal so by unlocking the load-mutex mutex. Doing so allows other loads.
It's all a little bit tricky and ugly, but for pre-alpha software, it's pretty usable.
I'll declare this bug fixed for the time being, but discussions of the relevant issues are still ongoing on the bug-guile mailing list, so the fix isn't final or anything.

Remco Bras <rvbras>
Project AdministratorIn charge of this item.
Sat 08 Mar 2008 05:01:00 PM UTC, comment #1:

I've tried all workarounds I could think of (but I may have missed a few very convoluted ones) and none worked. I've filed a bug report about this with the GUILE folks, so let's wait and see what they come up with.

Remco Bras <rvbras>
Project AdministratorIn charge of this item.
Sat 08 Mar 2008 06:35:02 AM UTC, original submission:

Whether this is a GUILE bug or our mistake, GUILE users cannot make threads in RPGE. Since they cannot, they cannot fork standard event handlers.

The proposed fix is to include a mechanism to let the engine fork off a set of requested threads just before entering the frame loop.

An alternative fix is to rewrite load-in-thread in C and expose it to GUILE. The latter fix is more general and probably should be used.

Remco Bras <rvbras>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rvbras (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Mar 2008 04:19:22 PM UTCrvbrasStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1