|Julia Improves Multithreading|
|Written by Kay Ewbank|
|Thursday, 28 November 2019|
Julia has a new release with support for multi-threading and the ability to add methods to an abstract type. Julia recently made it into the top six languages for machine learning projects on GitHub.
Julia is a dynamic language for technical computing that is especially good at running MATLAB and R-style programs. Development began on Julia at MIT in 2009.
The first improvement to the new release is the support for multi-threading. This is still at an early stage, and in this release there's an experimental macro (thread@spawn) that runs a task on any available thread. Writing about the new facility earlier this year, the developers said that
"any piece of a program can be marked for execution in parallel, and a “task” will be started to run that code automatically on an available thread. A dynamic scheduler handles all the decisions and details for you."
The Channel constructor has been simplified so it is easier to use and more 'Julia idiomatic', and system-level I/O operations and the global random number generator have been made thread-safe and thread local. There's a new channel spawn=true argument that can be used to schedule the created Task on any available thread, matching the behavior of threads @ spawn.
In addition to the multi-threading support, Julia now lets you add methods to an abstract type. It also now has a syntax for printing and parsing non-standard variable names.
The standard library has had a method added for finding regular expressions or strings within a string, and for extracting the number of matches.
Zero-dimensional arrays are another area to be improved. They are now consistently preserved in the return values of mathematical functions that operate on the array(s) as a whole. In previous versions, the functions
|Last Updated ( Thursday, 28 November 2019 )|