FAQ

On Thursday, March 7, 2013 3:35:27 AM UTC-6, Totoro Ghibli wrote:

Thanks to reply. But I am not sure with this statement:

*", but the receive in f() of program 2 is not guaranteed to complete
before the program exits.*"
Lets say f() is running on one cpu and main() is running on another
simultaneously.
Which takes longer falling off the end of main() or fmt.Printf() ?

A few other things may happen as well
* fmt.Printf() makes at least one syscall and possibly becomes blocked
* the os kernel might preempt the thread f() is running on just after the
channel receive, while the thread main is running on continues to run.
* probably more that I am not thinking of.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 7 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 7, '13 at 7:36a
activeMar 7, '13 at 5:58p
posts7
users5
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase