Changeset 4443 for trunk/compiler

Show
Ignore:
Timestamp:
08/22/08 04:57:20 (5 months ago)
Author:
pmoura
Message:

Small optimization to thread cancellation in threaded/1 calls.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4442 r4443  
    1354413544 
    1354513545'$lgt_mt_threaded_call_abort'([Id| Ids]) :- 
    13546     (   catch(thread_peek_message(Id, '$lgt_master'), _, fail) -> 
    13547         catch(thread_send_message(Id, '$lgt_result'(_, terminate)), _, true) 
    13548     ;   catch(thread_signal(Id, throw('$lgt_terminated')), _, true) 
    13549     ), 
    13550     '$lgt_mt_threaded_call_abort'(Ids). 
     13546    catch('$lgt_mt_abort_thread'(Id), _, true), 
     13547    '$lgt_mt_threaded_call_abort'(Ids). 
     13548 
     13549 
     13550'$lgt_mt_abort_thread'(Id) :- 
     13551    (   thread_peek_message(Id, '$lgt_master') -> 
     13552        thread_send_message(Id, '$lgt_result'(_, terminate)) 
     13553    ;   thread_signal(Id, throw('$lgt_terminated')) 
     13554    ). 
    1355113555 
    1355213556