EldoS | Feel safer!

Software components for data protection, secure storage and transfer

conflict between Unmount and System.Windows.Application.Current.Dispat

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
Posted: 09/17/2012 08:51:39
by ttran Tran (Priority Standard support level)
Joined: 08/20/2012
Posts: 35

In CBFS part, inside CbFsCloseFile we have a code to update GUI as following:

System.Windows.Application.Current.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, (System.Threading.ThreadStart)delegate

                Code for update GUI


OK, whenever we invoke myCbFs.unmount() during the uploading files process (it means CbFsCloseFile occurs), we discover that the application is always freezing at the GUI Thread above. Is that true that Unmount also access screen ?
What is the safe strategy to get rid of this freezing situation ?

Posted: 09/17/2012 09:17:11
by Eugene Mayevski (EldoS Corp.)

You should not do any UI operations in callback. The general rule is the less you do in callbacks, the better. You need to post an asynchronous notification to another thread (including main thread) which would handle the notification and update the UI.

Sincerely yours
Eugene Mayevski
Posted: 09/18/2012 13:16:19
by ttran Tran (Priority Standard support level)
Joined: 08/20/2012
Posts: 35

Thanks - valuable advice



Topic viewed 1086 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!