Get the latest tech news

For Go programmers, a cheap CGo pattern to give Jia Tan a headache


Wrapping a C library call in a defensive Go routine - main.md

Now we're asking the Go runtime to activate concurrency and main itself gets split into two compact parts with an anonymous function that disappears into the goroutine ecosphere (to get this to fit I'm stripping symbols): But now there is some real fun going on in myPrint() as it's acting as a traffic cop moving the string along its way into the chaos of pthread, with its context switches and semaphores. I'm still not sold on this approach but I'm definitely willing to change my own behavior to make these creeps go away if the difficulty is raised high enough.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of headache

headache

Photo of programmers

programmers

Photo of jia tan

jia tan

Related news:

News photo

Endless Adventures demos Adventure Forge tool to enable non-programmers to create narrative games

News photo

Google unveils Gemini Code Assist and I'm cautiously optimistic it will help programmers

News photo

The Mystery of ‘Jia Tan,’ the XZ Backdoor Mastermind