Thank you for your answer, it is clear now.
wtorek, 8 listopada 2022 o 13:38:33 UTC+1 ren...@ix.netcom.com napisał(a):
> To answer the rest of the question, since they are premptable they can be
> resumed on any thread. Go tries to use the same thread for performance but
> will issue memory bar
To answer the rest of the question, since they are premptable they can be
resumed on any thread. Go tries to use the same thread for performance but will
issue memory barriers when it cannot.
> On Nov 8, 2022, at 5:17 AM, peterGo wrote:
>
>
> piotr,
>
> Goroutines are now asynchronously pr
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 pio
I am fine with affinity changes during, say, a mutex or channel operation.
But does (or merely can) Go preempt the execution of leaf assembly
functions, basically re-creating threads in user space? Or is the currently
assigned thread mapping locked until the function decides to return, as
coope
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 lis
You can use runtime.LockOSThread() to control this.
> On Nov 7, 2022, at 12:01 PM, Amnon wrote:
>
> Go makes no guarantees about the affinity between goroutines and threads,
> and the mapping does typically jump around a lot during the execution of a
> program.
>
>> On Monday, 7 November 2
Go makes no guarantees about the affinity between goroutines and threads,
and the mapping does typically jump around a lot during the execution of a
program.
On Monday, 7 November 2022 at 17:46:42 UTC ren...@ix.netcom.com wrote:
> Do you mean Go assembly or an assembly function called via CGo?
Do you mean Go assembly or an assembly function called via CGo?
> On Nov 7, 2022, at 11:28 AM, Piotr Wyderski 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
> exe
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 th