[fpc-devel] improving error message when forgot to use cthreads unit
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun Apr 29 12:20:34 CEST 2012
On Sat, 28 Apr 2012 11:11:08 +0200
Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> On Sat, 28 Apr 2012 10:52:08 +0200 (CEST)
> Michael Van Canneyt <michael at freepascal.org> wrote:
>
> >
> >
> > On Sat, 28 Apr 2012, Mattias Gaertner wrote:
> >
> > > Hi,
> > >
> > > When someone forgets to use the cthreads unit and creates a thread the
> > > exception message is:
> > >
> > > Semaphore init failed (possibly too many concurrent threads)
> > >
> > > Can this message be improved for unix?
> > >
> > > Can it check if the thread manager is valid and then emit something
> > > like
> >
> > Define 'valid thread manager' ?
>
> I feared someone would ask that.
> Maybe check if it is the default one?
Maybe something like
{$IFDEF Unix}
GetThreadManager(TM);
if not Assigned(TM.InitManager) then
...add a note about cthreads...
{$ENDIF}
Mattias
More information about the fpc-devel
mailing list