EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0
From: Martin Konrad via Core-talk <[email protected]>
To: mdavidsaver <[email protected]>
Date: Mon, 17 Jun 2019 21:08:35 -0000
> Should the epicsThreadJoin() API take a timeout argument?
Definitely no.

> Given the nature of threads, join is only useful if the caller has already done something to ensure the thread will (eventually) return.
I agree. We might want to spend some time making it easier for developers to get the "signal the thread to shutdown" part right. Maybe by providing a good example in the Application Developer's Guide?

> Otherwise it seems a bit like allowing free() to timeout.
It's actually worse: Not freeing something leads to a memory leak (usually a minor problem) but not joining a thread might result in data races which takes us straight to undefined behavior land.
-- 
https://code.launchpad.net/~epics-core/epics-base/+git/Com/+merge/361379
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.

Navigate by Date:
Prev: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0 Andrew Johnson via Core-talk
Next: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0 Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0 Andrew Johnson via Core-talk
Next: Re: [Merge] ~epics-core/epics-base/+git/Com:thread-join into epics-base:7.0 Martin Konrad via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 17 Jun 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·