Thread overview
[D-runtime] Why do we expose thread_init()?
Jun 22, 2012
Sean Kelly
June 21, 2012
Hi,

Is there any particular reason we expose thread_init() in core.thread? This seems like the kind of function that really shouldn't be in the public API since it's used for internal runtime initialization.

Regards,
Alex
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime

June 21, 2012
On Jun 21, 2012, at 9:46 AM, Alex Rønne Petersen wrote:

> Hi,
> 
> Is there any particular reason we expose thread_init() in core.thread? This seems like the kind of function that really shouldn't be in the public API since it's used for internal runtime initialization.

Most of the extern © calls are not really meant for public use.  thread_init() has this name mostly because the namespace chosen for thread stuff was "thread_".  It would be easy enough to mark it private though.
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime

June 22, 2012
Yeah, my point is mostly that I don't think exposing this one particular function serves much purpose (and using it externally would most likely make the runtime blow up in 99.99998% of cases).

Regards,
Alex

On Fri, Jun 22, 2012 at 7:37 AM, Sean Kelly <sean@invisibleduck.org> wrote:
> On Jun 21, 2012, at 9:46 AM, Alex Rønne Petersen wrote:
>
>> Hi,
>>
>> Is there any particular reason we expose thread_init() in core.thread? This seems like the kind of function that really shouldn't be in the public API since it's used for internal runtime initialization.
>
> Most of the extern © calls are not really meant for public use.  thread_init() has this name mostly because the namespace chosen for thread stuff was "thread_".  It would be easy enough to mark it private though.
> _______________________________________________
> D-runtime mailing list
> D-runtime@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/d-runtime
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime