Completed ISO DTR definition of the message_queue_create/2 predicate. Still commented out waiting for a bug fix when creating queues without using aliases.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2113 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
eac625e0ec
commit
045965e3ed
@ -523,7 +523,7 @@ message_queue_create(Id, [alias(Alias)]) :-
|
|||||||
message_queue_create(Id, [alias(Alias)]) :-
|
message_queue_create(Id, [alias(Alias)]) :-
|
||||||
\+ atom(Alias), !,
|
\+ atom(Alias), !,
|
||||||
'$do_error'(type_error(atom,Alias), message_queue_create(Id, [alias(Alias)])).
|
'$do_error'(type_error(atom,Alias), message_queue_create(Id, [alias(Alias)])).
|
||||||
message_queue_create(Id, [alias(Alias)]) :-
|
message_queue_create(Id, [alias(Alias)]) :- !,
|
||||||
'$global_queue_mutex'(QMutex),
|
'$global_queue_mutex'(QMutex),
|
||||||
'$lock_mutex'(QMutex),
|
'$lock_mutex'(QMutex),
|
||||||
'$new_mutex'(Mutex),
|
'$new_mutex'(Mutex),
|
||||||
@ -538,13 +538,17 @@ message_queue_create(Id, [alias(Alias)]) :-
|
|||||||
; recorda('$queue',q(Alias,Mutex,Cond,Id), _),
|
; recorda('$queue',q(Alias,Mutex,Cond,Id), _),
|
||||||
'$unlock_mutex'(QMutex)
|
'$unlock_mutex'(QMutex)
|
||||||
).
|
).
|
||||||
|
message_queue_create(Id, [Option| _]) :-
|
||||||
|
'$do_error'(domain_error(queue_option, Option), message_queue_create(Id, [Option| _])).
|
||||||
|
message_queue_create(Id, Options) :-
|
||||||
|
'$do_error'(type_error(list, Options), message_queue_create(Id, Options)).
|
||||||
|
|
||||||
message_queue_create(Id) :-
|
message_queue_create(Id) :-
|
||||||
( var(Id) -> % ISO DTR
|
( var(Id) -> % ISO DTR
|
||||||
message_queue_create(Id, [])
|
message_queue_create(Id, [])
|
||||||
; atom(Id) -> % old behavior
|
; atom(Id) -> % old behavior
|
||||||
message_queue_create(_, [alias(Id)])
|
message_queue_create(_, [alias(Id)])
|
||||||
;
|
; '$do_error'(type_error(variable, Id), message_queue_create(Id)).
|
||||||
).
|
).
|
||||||
*/
|
*/
|
||||||
message_queue_create(_, [alias(Alias)]) :- % TEMPORARY FIX
|
message_queue_create(_, [alias(Alias)]) :- % TEMPORARY FIX
|
||||||
|
Reference in New Issue
Block a user