Threading.Thread general question

Discussion in 'Mixed Languages' started by QuantumBug, Mar 9, 2013.

  1. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,472
    1,292
    60
    In one of my applications I'm using a a few threads to check things every so often. I was just wondering if I should abort or stop them on application exit?

    Or does it really not matter?

    I was thinking general cleanup to eliminate issues.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Michaela Joy

    Michaela Joy MDL Crazy Lady

    Jul 26, 2012
    3,436
    3,573
    120
    Hi Dev,
    It's good programming practice to shut down threads in an orderly fashion, especially if the thread is doing inet processing or using memory buffers.

    Just My 2 cents (pence) :)

    :Miki.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,472
    1,292
    60
    #3 QuantumBug, Mar 9, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Well in that case I'd guess to terminate any threads using...

    Code:
    Do
       'Some code
       Thread.Sleep(1000)
    Loop
    ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Michaela Joy

    Michaela Joy MDL Crazy Lady

    Jul 26, 2012
    3,436
    3,573
    120
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. QuantumBug

    QuantumBug MDL Developer

    Mar 7, 2012
    1,472
    1,292
    60
    #5 QuantumBug, Mar 9, 2013
    Last edited: Mar 9, 2013
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...