2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Graceful Shutdown with joinable thread |
From: | "Kim, Kukhee via Core-talk" <core-talk at aps.anl.gov> |
To: | EPICS core-talk <core-talk at aps.anl.gov> |
Date: | Wed, 1 Apr 2020 15:59:46 +0000 |
Hi Everyone,
I recently worked for some epics drivers to implement a graceful shutdown and got a question.
The drivers are SLAC specific but the question is general.
I saw there are some API changes to allow joinable thread.
Thus, I used it: "epicsThreadCreateOpt() with joinable option, and epicsThreadMustJoin()"
It looks mostly the same as the old way but is slightly better personally.
There is a small downside: more steps to create thread - I have to set up a thread option structure before calling epicsThreadCreateOpt(),
Since, the un-joinable thread is default and it is for backward compatibility.
I am wondering about our evolutional direction:
Are we going to keep the un-joinable thread as a default? Or, migrate to the joinable thread?
Thank you for your advice.
I hope everyone keeps stay healthy and safe.
Best regards,
Kukhee
Kukhee Kim TID AIR Advanced Control System SLAC National Accelerator Laboratory 2575 Sand Hill Rd, MS 94 Menlo Park, CA 94025 Email: khkim at SLAC.Stanford.EDU Phone: (650)926-4912 Fax: (650)926-2923 |