Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Hey

Name: Anonymous 2011-11-02 8:38

So, I'm writing a single-threaded program in c++ with a couple hundred functions that all access a global object. I now want to instantiate this program in multiple threads, that all access a designated copy of that object. Is there an easy way to do this, or do I have to rewrite the whole thing?

Name: Anonymous 2011-11-02 8:45

thread_local

Name: Anonymous 2011-11-02 9:07

>>2
Oh boy! That's a really neat feature! Unfortunately, I'd be very uncomfortable changing to another compiler. I guess I'll just have to wait until gcc gets ahead. In the meantime, any other suggestions?

Name: Anonymous 2011-11-02 9:10

>>3
fork and ipc

Have a nice day.

Name: Anonymous 2011-11-02 10:28

Hate to break it to you, >>1-san, but your program is broken by design.

Name: Anonymous 2011-11-02 11:29

So, I'm writing a single-threaded program in c++ with a couple hundred functions that all access a global object.
Looks like someone's rewriting Python in C++!

Name: Anonymous 2011-11-02 13:42

>>5
My design broke it? What do you mean?

Name: Anonymous 2013-12-13 14:03

u mad?

Name: Anonymous 2013-12-15 14:45

>>3
`>what is GCC 4.9
>2011

Name: Anonymous 2013-12-15 17:27

Wow. A thread I posted two years ago just happened to be on top of the front page on the same rare occasion that I happen to visit /prog/. Thanks for the memories >>8.

Name: Anonymous 2013-12-15 18:34

>>10
>le pedophile sage

Don't change these.
Name: Email:
Entire Thread Thread List