Using Threads

Rickard Green rickard.green@REDACTED
Thu Jun 7 14:49:54 CEST 2001


Hello,

The emulator is by default not built with thread support in the open
source release. In order to enable thread support one is supposed to
pass the "--enable-threads" argument to the configure script; but, due
to a bug this doesn't work. One can easily bypass this bug, though.

Do the following to build the open source release with thread support:

  # Set the ERL_TOP environment variable to the absolute path of the
  # top level directory

  cd $ERL_TOP
  ./configure --enable-threads $MY_OTHER_CONFIG_ARGS

  cd $ERL_TOP/erts/autoconf                           # These steps
  ./configure --enable-threads $MY_OTHER_CONFIG_ARGS  # bypass the
  cd $ERL_TOP                                         # bug.

  make
  make install

If you succeeded "[threads]" should pop up on the first line in the
Erlang shell.

This bug will be fixed in the next patch to r7b01.


/Rickard Green, Erlang/OTP, Ericsson UAB


Sean Hinde wrote:
> 
> Vance,
> 
> > Now the next question I have is why I can't get threads at all on
> > any system other than Windows.  Solaris is supposed to be supported
> > but mine doesn't seam to work:
> >
> > $ erl +A10
> > Erlang (BEAM) emulator version 5.0.1.1 [source]
> >
> > Eshell V5.0.1.1  (abort with ^G)
> > 1> erlang:system_info(thread_pool_size).
> > 0
> 
> This works as below for the commercial Solaris version on my machine:
> 
> erl +A10
> Erlang (BEAM) emulator version 5.0.2.2 [threads]
> 
> Eshell V5.0.2.2 (abort with ^G)
> 1> erlang:system_info(thread_pool_size).
> 10
> 
> The version I compiled from open source gives the same response as you got.
> 
> I wonder if the little [threads] logo might give a clue ??
> 
> Rgds,
> Sean
> 
> NOTICE AND DISCLAIMER:
> This email (including attachments) is confidential.  If you have received
> this email in error please notify the sender immediately and delete this
> email from your system without copying or disseminating it or placing any
> reliance upon its contents.  We cannot accept liability for any breaches of
> confidence arising through use of email.  Any opinions expressed in this
> email (including attachments) are those of the author and do not necessarily
> reflect our opinions.  We will not accept responsibility for any commitments
> made by our employees outside the scope of our business.  We do not warrant
> the accuracy or completeness of such information.




More information about the erlang-questions mailing list