DiscussionsIssue archiveOther usage issues

Archived discussion

Multitasking questions

Other usage issuesFri, 04/03/2009 - 12:292 replies

Browse this forum
QuestionAuthor

I know that occ doesn't support yet full multithreading, but it is safe to write an application with two thread, one for the GUI (Qt, AIS_InteractiveContext, V3d_View, ...) and the other for the actual processing (it uses OCC but not Visualization classes)?

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Author,

Yes, this must be possible. I recall there was a Collision Detection demo application that was multi-threaded where computations were performed in a work thread while GUI still remained responsive and the user could rotate, zoom, pan the model.

You should set MMGT_REENTRANT variable to 1 or use Standard::SetReentrant(Standard_True) before your fork the threads.

By the way, note that Qt requires that the event loop (and hence all GUI) runs in a main thread.

Hope this helps.
Commenter-1
---
opencascade.blogspot.com - the Open CASCADE blog

02Commenter-2

Thanks, I'll try and let you know.

Commenter-2