🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7403

Fun with threads

#7403
From: Sean Capstick
Date: Thu, 21 Jun 2001 15:07
14 lines
1322 bytes
    How can I notify a program's main thread that it's okay to terminate?  I
have a program that does this:
Program starts
Starts a thread to do some background processing
Main thread continues to run, handle the user interface, etc.
Processing thread will eventually finish.
User must close the program

When the processing is finished, I want to signal the main thread which will
pop up an 'All done' message box and then terminate.  How should I
accomplish this?

Thanks,
Sean
Technical Details
Message-ID: <3b320ce8_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2fd1c7b03719c733,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-21 08:14:47 PST
From: "Sean Capstick" <nospam.scapstick@dimensions.ca>
Newsgroups: borland.public.jbuilder.java.language
Subject: Fun with threads
Date: Thu, 21 Jun 2001 11:07:53 -0400
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 207.139.208.137
Message-ID: <3b320ce8_1@dnews>
X-Trace: dnews 993135848 207.139.208.137 (21 Jun 2001 08:04:08 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews