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: mdavidsaver via Core-talk <[email protected]>
To: mdavidsaver <[email protected]>
Date: Mon, 17 Jun 2019 20:25:28 -0000
> I noticed the other day that VxWorks 6.9 added this API:

8-()

> Should the epicsThreadJoin() API take a timeout argument?

I would say no.  Given the nature of threads, join is only useful if the caller has already done something to ensure the thread will (eventually) return.  If there is some doubt about this, then it should be handled at this earlier phase.

Otherwise it seems a bit like allowing free() to timeout.

> Shouldn't the C++ class also have a join() method?

I suppose this could be added.  I was thinking first of a non-invasive change.

https://en.cppreference.com/w/cpp/thread/thread/join

> EPICS_THREAD_CAN_JOIN

This will go away now.

> epicsThreadJoin(epicsThreadGetIdSelf()) should become unjoinable

I'll take a look.

> adding some tests to epicsThreadTest.cpp would be helpful

Any thoughts on what to test?  I couldn't think of any meaningful unittest to see if resources have actually been freed.  Mostly I added prints while developing (especially for RTEMS), and ran epicsThreadTest through valgrind on Linux.
-- 
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 Andrew Johnson 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 Andrew Johnson 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 ·