File tree Expand file tree Collapse file tree
src/main/clojure/clojure/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -494,7 +494,10 @@ return nil for unexpected contexts."
494494 core.async blocking ops (those ending in !!) and other blocking IO.
495495
496496 Returns a channel which will receive the result of the body when
497- completed"
497+ completed.
498+
499+ go blocks will remain in memory only while their referenced channels
500+ remain in memory."
498501 [& body]
499502 ((requiring-resolve 'clojure.core.async.impl.go/go-impl) &env body))
500503
@@ -533,8 +536,12 @@ return nil for unexpected contexts."
533536 " Executes the body in a thread, returning immediately to the calling
534537 thread. The body may do blocking I/O but must not do extended computation.
535538 Returns a channel which will receive the result of the body when completed,
536- then close. When virtual threads are available in the runtime JVM (>= v21)
537- then core.async will dispatch body to one."
539+ then close.
540+
541+ When virtual threads are available in the runtime JVM (>= v21)
542+ then core.async will dispatch body to one. Like regular threads, (and unlike
543+ go blocks) virtual threads must terminate ordinarily and will keep
544+ referenced resources alive until they do."
538545 [& body]
539546 `(thread-call (^:once fn* [] ~@body) :io ))
540547
You can’t perform that action at this time.
0 commit comments