mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-30 23:23:07 +00:00 
			
		
		
		
	| @@ -3375,7 +3375,7 @@ | |||||||
|     ~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t))) |     ~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t))) | ||||||
|  |  | ||||||
|   (defmacro ev/spawn-thread |   (defmacro ev/spawn-thread | ||||||
|     ``Run some code in a new thread. Like `ev/do-thread`, but returns immediately with a fiber.`` |     ``Run some code in a new thread. Like `ev/do-thread`, but returns nil immediately.`` | ||||||
|     [& body] |     [& body] | ||||||
|     ~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t) nil :n)) |     ~(,ev/thread (fiber/new (fn _thread [&] ,;body) :t) nil :n)) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -943,7 +943,7 @@ JANET_CORE_FN(cfun_channel_pop, | |||||||
| JANET_CORE_FN(cfun_channel_choice, | JANET_CORE_FN(cfun_channel_choice, | ||||||
|               "(ev/select & clauses)", |               "(ev/select & clauses)", | ||||||
|               "Block until the first of several channel operations occur. Returns a tuple of the form [:give chan], [:take chan x], or [:close chan], where " |               "Block until the first of several channel operations occur. Returns a tuple of the form [:give chan], [:take chan x], or [:close chan], where " | ||||||
|               "a :give tuple is the result of a write and :take tuple is the result of a write. Each clause must be either a channel (for " |               "a :give tuple is the result of a write and :take tuple is the result of a read. Each clause must be either a channel (for " | ||||||
|               "a channel take operation) or a tuple [channel x] for a channel give operation. Operations are tried in order, such that the first " |               "a channel take operation) or a tuple [channel x] for a channel give operation. Operations are tried in order, such that the first " | ||||||
|               "clauses will take precedence over later clauses. Both and give and take operations can return a [:close chan] tuple, which indicates that " |               "clauses will take precedence over later clauses. Both and give and take operations can return a [:close chan] tuple, which indicates that " | ||||||
|               "the specified channel was closed while waiting, or that the channel was already closed.") { |               "the specified channel was closed while waiting, or that the channel was already closed.") { | ||||||
| @@ -2438,7 +2438,7 @@ JANET_CORE_FN(cfun_ev_go, | |||||||
|               "(ev/go fiber &opt value supervisor)", |               "(ev/go fiber &opt value supervisor)", | ||||||
|               "Put a fiber on the event loop to be resumed later. Optionally pass " |               "Put a fiber on the event loop to be resumed later. Optionally pass " | ||||||
|               "a value to resume with, otherwise resumes with nil. Returns the fiber. " |               "a value to resume with, otherwise resumes with nil. Returns the fiber. " | ||||||
|               "An optional `core/channel` can be provided as well as a supervisor. When various " |               "An optional `core/channel` can be provided as a supervisor. When various " | ||||||
|               "events occur in the newly scheduled fiber, an event will be pushed to the supervisor. " |               "events occur in the newly scheduled fiber, an event will be pushed to the supervisor. " | ||||||
|               "If not provided, the new fiber will inherit the current supervisor.") { |               "If not provided, the new fiber will inherit the current supervisor.") { | ||||||
|     janet_arity(argc, 1, 3); |     janet_arity(argc, 1, 3); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose