piotr,

Goroutines are now asynchronously preemptible. As a result, loops without 
function calls no longer potentially deadlock the scheduler or 
significantly delay garbage collection. February 2020,  
https://go.dev/doc/go1.14#runtime

peter


On Tuesday, November 8, 2022 at 3:31:25 AM UTC-5 piotr.w...@gmail.com wrote:

> I mean the Plan 9 assembler. Also assume the function is a leaf function, 
> just a long one. Can such a function be preempted by Go runtime and 
> re-assigned to another thread or can the reassignment happen only 
> cooperatively, in a number of roughly predictable selected places? 
>
> poniedziałek, 7 listopada 2022 o 18:46:42 UTC+1 ren...@ix.netcom.com 
> napisał(a):
>
>> Do you mean Go assembly or an assembly function called via CGo?
>>
>> On Nov 7, 2022, at 11:28 AM, Piotr Wyderski <piotr.w...@gmail.com> wrote:
>>
>> 
>>
>> Hello,
>>
>> A goroutine needs ultimately to be assigned to an OS thread. If a 
>> goroutine calls an assembly function F, can the thread assignment change 
>> during the execution of F? 
>> In other words, is F guaranteed to return on the same thread it was 
>> called?
>>
>>    Best regards, Piotr
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/03f2cf25-7e52-41ca-ac20-a04877d5df9dn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/03f2cf25-7e52-41ca-ac20-a04877d5df9dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/69436177-2cee-452f-8df9-837353a4e742n%40googlegroups.com.

Reply via email to