I'd like to add this short code example in the doxygen docs for
Fl::awake(func,data) to demonstrate how calling Fl::lock() is
required before using it:
It made sense to put this below the text in that doxygen comment section that used to read:
Nevertheless, the early, single call to Fl::lock() used to initialize threading support is necessary.
..but in a recent commit, this text was removed for some reason? I'm wondering if this was on purpose, or an omission/regression. I added this commit comment mentioning this, but not sure if those comments are easily seen by the commit author, so wanted to draw attention to this here for conversation.
Is it the case "calling Fl::lock() early" is no longer required for Fl::awake() to work in 1.5.x, hence the removal of that line? Or was the doxygen comment that underlines this removed for other purposes, perhaps depending more on the "See Also" references.
I'm guessing it's a regression; seems important to restore that "Nevertheless, the early, single call to Fl::lock()" line, as without it I probably wouldn't have been able to answer the OP's question yesterday; as I don't use Fl:awake() myself.
On Sun, 22 Jun 2025, 17:44 Greg wrote:
It made sense to put this below the text in that doxygen comment section that used to read:
Nevertheless, the early, single call to Fl::lock() used to initialize threading support is necessary.
..but in a recent commit, this text was removed for some reason? I'm wondering if this was on purpose, or an omission/regression. I added this commit comment mentioning this, but not sure if those comments are easily seen by the commit author, so wanted to draw attention to this here for conversation.
Is it the case "calling Fl::lock() early" is no longer required for Fl::awake() to work in 1.5.x, hence the removal of that line? Or was the doxygen comment that underlines this removed for other purposes, perhaps depending more on the "See Also" references.
I'm guessing it's a regression; seems important to restore that "Nevertheless, the early, single call to Fl::lock()" line, as without it I probably wouldn't have been able to answer the OP's question yesterday; as I don't use Fl:awake() myself.
AFAIK it's still required, so like Greg I think this is something that looks like a regression in the docs.
I'd also mention here the "Advanced FLTK" section of the docs, which has quite a lot on this topic so maybe useful to the OP, if they've not already read it.