Changeset 4456

Show
Ignore:
Timestamp:
08/30/08 07:05:02 (4 months ago)
Author:
pmoura
Message:

Corrected a bug in the implementation of the threaded_once/1-2 built-in multi-threading predicates (use of detached threads could make the methods fail despite the success of the thread goals).

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4453 r4456  
    1322013220 
    1322113221'$lgt_mt_dispatch_goal'(once, Queue, Goal, This, Self, Tag) :- 
    13222     thread_create('$lgt_mt_det_goal'(Queue, Goal, This, Self, Tag), _, [detached(true)]), 
     13222    thread_create('$lgt_mt_det_goal'(Queue, Goal, This, Self, Tag), _, [detached(false)]), 
    1322313223    % wait until the thread created for proving the goal is ready before proceeding: 
    1322413224    thread_get_message(Queue, '$lgt_det_ready'(Goal, This, Self, Tag)). 
     
    1326513265        thread_get_message(Queue, '$lgt_thread_id'(Type, Goal, This, Self, Tag, Id)), 
    1326613266        (   Type == once -> 
    13267             '$lgt_mt_det_reply'(Queue, Goal, This, Self, Tag, Id)           % detached thread 
     13267            '$lgt_mt_det_reply'(Queue, Goal, This, Self, Tag, Id), 
     13268            thread_join(Id, _) 
    1326813269        ;   call_cleanup( 
    1326913270                '$lgt_mt_non_det_reply'(Queue, Goal, This, Self, Tag, Id), 
  • trunk/RELEASE_NOTES.txt

    r4453 r4456  
    1414 
    1515 
    16 2.33.0 - August ??, 2008 
     162.33.0 - September ??, 2008 
    1717 
    1818    Applied several optimizations to the Logtalk compiler, mostly related to  
     
    4444    Removed the Logtalk dispatcher thread used for dispatching asynchronous  
    4545    multi-threading calls, simplifying the implementation and improving the  
    46     performance of the asynchronous built-in multi-threading predicates.  
     46    performance of the asynchronous built-in multi-threading predicates. 
     47 
     48    Corrected a bug in the implementation of the threaded_once/1-2 built-in  
     49    multi-threading predicates (use of detached threads could make the methods  
     50    fail despite the success of the thread goals). 
    4751 
    4852    Improved performance of multi-threading applications (specially on MacOS X)