Re: Redesigning Libvirt: Adopting use of a safe language

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> writes:

[...]
> Goroutines are basically a union of the thread + coroutine concepts. The
> Go runtime will create N OS level threads, where the default N currently
> matches the number of logical CPU cores you host has (but is tunable to
> other values). The application code just always creates Goroutines which
> are userspace threads just like coroutines. The Go runtime will dynamically
> switch goroutines at key points, and automatically pick suitable OS level
> threads to run them on to maximize concurrency. Most cleverly goroutines
> have a 2 KB default stack size, and runtime will dynamically grow the
> stack if that limit is reached.

Does this work even when the stack limit is exceeded in a C function?

>                                 So this avoids the problem of picking a
> suitable stack size, and avoids any danger of overruns. As a result it
> is possible for a process to create *1000's* of goroutines and have less
> overhead than if you tried todo the same thing in C with threads+coroutines
> manually.
[...]

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux