thread at_exit should be module aware.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2206 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
042e5326d3
commit
f930fd3179
@ -175,7 +175,8 @@ thread_create(Goal, Id, Options) :-
|
||||
( \+ integer(System) -> '$do_error'(type_error(integer,System),G0) ; true ).
|
||||
'$thread_option'(detached(Detached), _, _, _, _, Detached, _, G0) :- !,
|
||||
( Detached \== true, Detached \== false -> '$do_error'(domain_error(thread_option,Detached+[true,false]),G0) ; true ).
|
||||
'$thread_option'(at_exit(AtExit), _, _, _, _, _, AtExit, G0) :- !,
|
||||
'$thread_option'(at_exit(AtExit), _, _, _, _, _, M:AtExit, G0) :- !,
|
||||
'$current_module'(M),
|
||||
( \+ callable(AtExit) -> '$do_error'(type_error(callable,AtExit),G0) ; true ).
|
||||
'$thread_option'(Option, _, _, _, _, _, _, G0) :-
|
||||
'$do_error'(domain_error(thread_option,Option),G0).
|
||||
@ -289,7 +290,8 @@ thread_set_default(Default) :-
|
||||
'$thread_set_default'(at_exit(AtExit), _) :- !,
|
||||
recorded('$thread_defaults', [Stack, Trail, System, Detached, _], Ref),
|
||||
erase(Ref),
|
||||
recorda('$thread_defaults', [Stack, Trail, System, Detached, AtExit], _).
|
||||
'$current_module'(M),
|
||||
recorda('$thread_defaults', [Stack, Trail, System, Detached, M:AtExit], _).
|
||||
|
||||
'$thread_set_default'(Default, G) :-
|
||||
'$do_error'(domain_error(thread_default, Default), G).
|
||||
|
Reference in New Issue
Block a user