Changeset 3842 for trunk/compiler

Show
Ignore:
Timestamp:
09/16/07 01:08:53 (16 months ago)
Author:
pmoura
Message:

Corrected a bug when retrieving multi-threading replies.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r3841 r3842  
    1236412364        (   Option == ignore ->     % don't bother reporting goal success, failure, or exception 
    1236512365            thread_create(catch(Goal, _, true), _, [detached(true)]) 
    12366         ;   Option = once(Tag) ->       % make thread goal deterministic 
     12366        ;   Option = once(Tag) ->   % make thread goal deterministic 
    1236712367            thread_create('$lgt_mt_det_goal'(Queue, Goal, This, Self, Tag), _, [detached(true)]) 
    12368         ;   Option = call(Tag) -> 
     12368        ;   Option = call(Tag) ->   % make thread goal non-deterministic 
    1236912369            thread_create('$lgt_mt_non_det_goal'(Queue, Goal, This, Self, Tag), _, [detached(false)]) 
    1237012370        ), 
     
    1237312373 
    1237412374 
    12375 % '$lgt_mt_det_goal'(+message_queue, +callable, +object_identifier, +object_identifier, @nonvar) 
     12375% '$lgt_mt_det_goal'(+atom, +callable, +object_identifier, +object_identifier, @nonvar) 
    1237612376% 
    1237712377% processes a deterministic message received by an object's message queue 
     
    1239312393 
    1239412394 
    12395 % '$lgt_mt_non_det_goal'(+message_queue, +callable, +object_identifier, +object_identifier, @nonvar) 
     12395% '$lgt_mt_non_det_goal'(+atom, +callable, +object_identifier, +object_identifier, @nonvar) 
    1239612396% 
    1239712397% processes a non-deterministic message received by an object's message queue 
     
    1248212482'$lgt_mt_get_reply'(Queue, Goal, Sender, This, Self, Tag) :- 
    1248312483    (   % first check if there is a thread running for proving the goal before proceeding: 
    12484         \+ \+ thread_peek_message(Queue, '$lgt_thread_id'(Type, Goal, This, Self, Tag, Id)) -> 
     12484        thread_peek_message(Queue, '$lgt_thread_id'(Type, Goal, This, Self, Tag, Id)) -> 
    1248512485        % answering thread exists; go ahead and retrieve the solution(s): 
    12486         thread_get_message(Queue, '$lgt_thread_id'(Type, _, This, Self, Tag, Id)), 
     12486        thread_get_message(Queue, '$lgt_thread_id'(Type, Goal, This, Self, Tag, Id)), 
    1248712487        call_cleanup( 
    1248812488            '$lgt_mt_get_reply_aux'(Type, Queue, Goal, This, Self, Tag, Id),