place-channel? returns #t for place descriptors, doc clarification

This commit is contained in:
Kevin Tew 2011-09-30 17:05:23 -06:00
parent a7b0c33896
commit e650764a4c
3 changed files with 5 additions and 2 deletions

View File

@ -257,7 +257,8 @@ If any pumping threads were created to connect a non-@tech{file-stream
}
@defproc[(place-channel-put [pch place-channel?] [v place-message-allowed?]) void]{
Sends a message @racket[v] on channel @racket[pch].
Sends a message @racket[v] on channel @racket[pch]. Since place channels
are asynchronous, @racket[place-channel-put] calls are non-blocking.
See @racket[place-message-allowed?] form information on automatic
coercions in @racket[v], such as converting a mutable string to an

View File

@ -12,6 +12,7 @@
(test #f place? 1)
(test #f place? void)
(test #t place? p)
(test #t place-channel? p)
(err/rt-test (place-wait 1))
(err/rt-test (place-wait void))

View File

@ -2572,7 +2572,8 @@ static Scheme_Object *place_channel(int argc, Scheme_Object *args[]) {
static Scheme_Object *place_channel_p(int argc, Scheme_Object *args[])
{
return SAME_TYPE(SCHEME_TYPE(args[0]), scheme_place_bi_channel_type) ? scheme_true : scheme_false;
return (SAME_TYPE(SCHEME_TYPE(args[0]), scheme_place_bi_channel_type) ||
SAME_TYPE(SCHEME_TYPE(args[0]), scheme_place_type)) ? scheme_true : scheme_false;
}
static Scheme_Object *GC_master_make_vector(int size) {