Re: Read file using multithreads

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Sat, 28 Apr 2007 07:30:02 -0700, hangaround wrote:

I wanna read a video file using multithreads, and I use critical section
to synchronize the access, thereby the UI would be blocked , and I dont know
why, Who can point me out?

Without more background I don't really understand the purpose of your
multiple read threads, however you can eliminate the problem by either
using overlapped IO or by having an open handle for each thread. That way
you don't need the file access synchronization.

UI is blocked anytime your UI thread (the message loop thread which is the
main thread by default) hits the critical section and blocks.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
.



Relevant Pages

  • Re: A threading problem
    ... I dont really care which thread the send and receive happens on, ... If you want to synchronize the two methods, ... The question you posted is confusing for a couple of reasons: ... it safe to assume that you actually create the OutputBuffer timer using ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Synchronization
    ... We do use Active Directory. ... Although I dont know that you can change what is synchronized. ... The Synchronize is ... the server. ...
    (microsoft.public.windowsxp.general)
  • Re: How to synchronize 4 threads.
    ... > I need to synchronize 4 different threads. ... I dont think waitand ... > notifyall() will work. ... Prev by Date: ...
    (comp.lang.java)
  • Active Sync with Outlook - problems - !!!
    ... I cant synchronize my Outlook 2002 for weeks... ... now, I dont ...
    (microsoft.public.pocketpc.activesync)
  • About combining Audio and video flow graph?
    ... I have create one audio and video flow graph in the directshow ... but I don't know how to synchronize them? ... me some hint on how to go about it? ...
    (microsoft.public.win32.programmer.directx.video)