Backgroundworker abort
        Posted  
        
            by MazarD
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by MazarD
        
        
        
        Published on 2009-03-05T10:28:13Z
        Indexed on 
            2010/04/07
            3:03 UTC
        
        
        Read the original article
        Hit count: 732
        
Hi,
I recently tried to use backgroundworker instead of "classic" threads and I'm realizing that it's causing, at least for me, more problems than solutions. I have a backgroundworker running a synchronous read (in this case from serialPort) and getting blocked around 30 seconds in 1 code line, then cancellationpending isn't the solution. I'm seeing that if the application gets closed at this point (either with the cross button and Application.Exit()) the process keeps zombie forever.
I need a way to force abort or to kill the backgroundworker thread.
© Stack Overflow or respective owner