Results 1 to 16 of 16

Thread: No context switch between Threads and parent ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Jul 2008
    Posts
    66
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    5

    Default Re: No context switch between Threads and parent ?

    hi,

    If you use non-blocking IO, you don't have to have any separate threads.
    When I use there functions like "WaitForMultipleObjects", where the reader thread must wait for some events like "data arrived" or sth. like that, it will block the thread until data is available.
    Meanwhile my writer thread could do some IO operations. Thats the reason why I need two threads.


    Swapping in what way?
    Now my threads are children of the the serial-class and they use the pointer of parent to execute parent-functions.
    When I switch parent to children and children to parent, every access to serial-class-object would run in the threads context and not in the main-app.


    Have you tried QExtSerialPort?
    Yes, but it just allows blocking IO. overlapped IO is not implemented yet.
    Last edited by donglebob; 28th October 2008 at 09:49. Reason: reformatted to look better

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.