[Mono-list] Calling two methods from two seperate threads in the same MonoDomain (mono embedding)
Darkas at gmx.net
Mon Jul 21 17:04:04 EDT 2008
I guess I have to call it from the new thread, so I did that. If I call it
with mono_domain_get(), I get the same message as before. But if I call it
with domain (my pointer to the MonoDomain), then I get a huge stacktrace.
And now it becomes wired.
I use SDL to perform drawing and such tasks. If I call
screen = SDL_SetVideoMode(width, height, 0, SDL_HWSURFACE | SDL_DOUBLEBUF |
then it creates a new window. If I call this before
mono_jit_exec(domain, assembly, argc - 1, argv + 1);
then it creates the window, and everything works fine. But if I call the
method SetScreenParameters from managed code, which also calls
SDL_SetViedeoMode(...) then I get an error and the program crashes. I'm not
sure why, because before I used the multithreading, it worked (but
multithreading is necessary, everything before was just testing).
View this message in context: http://www.nabble.com/Calling-two-methods-from-two-seperate-threads-in-the-same-MonoDomain-%28mono-embedding%29-tp18568417p18577539.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list