mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
26c36d0a2e
This ensures that calls to print/println happening in different threads are not interleaved. It's a task.PMutex, so this should only change things when threading is used. This matches the Go compiler, which does the same thing: https://godbolt.org/z/na5KzE7en The locks are not recursive, which means that we need to be careful to not call `print` or `println` inside a runtime.print* implementation, inside putchar (recursively), and inside signal handlers. Making them recursive might be useful to do in the future, but it's not really necessary.
32 lines
264 B
Plaintext
32 lines
264 B
Plaintext
hello world!
|
|
42
|
|
100000000
|
|
abc
|
|
a b c
|
|
123
|
|
123
|
|
-123
|
|
12345
|
|
12345
|
|
-12345
|
|
12345678
|
|
12345678
|
|
-12345678
|
|
123456789012
|
|
123456789012
|
|
-123456789012
|
|
+3.140000e+000
|
|
+3.140000e+000
|
|
(+5.000000e+000+1.234500e+000i)
|
|
(0:nil)
|
|
true
|
|
foobar
|
|
-3
|
|
3
|
|
-3
|
|
3
|
|
map[2]
|
|
true false
|
|
[0/0]nil
|
|
[0/0]nil
|