summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/main.cc')
-rw-r--r--Build/source/utils/asymptote/main.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc
index 0cd7a281d58..1a42ff47bba 100644
--- a/Build/source/utils/asymptote/main.cc
+++ b/Build/source/utils/asymptote/main.cc
@@ -154,12 +154,6 @@ void *asymain(void *A)
int status;
while(wait(&status) > 0);
}
-#ifdef HAVE_LIBGL
-#ifdef HAVE_LIBPTHREAD
- if(gl::glthread)
- pthread_join(gl::mainthread,NULL);
-#endif
-#endif
exit(em.processStatus() || interact::interactive ? 0 : 1);
}
@@ -179,8 +173,10 @@ int main(int argc, char *argv[])
#ifdef HAVE_LIBPTHREAD
if(gl::glthread) {
+ pthread_t thread;
try {
- if(pthread_create(&gl::mainthread,NULL,asymain,&args) == 0) {
+ if(pthread_create(&thread,NULL,asymain,&args) == 0) {
+ gl::mainthread=pthread_self();
while(true) {
camp::glrenderWrapper();
gl::initialize=true;