Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

C/Motif/*nix: Long processing is locking out the GUI window.

Posted on 2004-09-10
1
Medium Priority
?
220 Views
Last Modified: 2010-04-15
I have an application in C/Motif on Solaris which will go off into some long processing routines which can last several minutes (basically opening large files, reading and manipulating data, then writing out to a new file in a different format).  This long processing is started in a Callback function.  During this time the GUI main window is essentially locked up.  Now, it's not completely locked up because I'm dumping info to a text window and the window is occasionally updated, but the user is not able to access any menus, etc.  I assume it's simply because the processing function is eating all the CPU time.  Once the Callback process completes the window is accessible again.  BTW, I'm running CDE and all other windows outside my application are still active.  Is there a solution to this?
0
Comment
Question by:jimdgar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 375 total points
ID: 12029660
I think you should probably run the long processing routines in a separate thread.
Have the callback routine spawn the thread.  Have the background thread send
messages to the main thread, which can display the status in the GUI.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question