[GRASS5] Are GRASS Library functions thread-safe?

Roger Bivand Roger.Bivand at nhh.no
Wed Jun 18 02:44:20 EDT 2003


On Tue, 17 Jun 2003, zhang ji wrote:

> Hi,
> 
> I want to know the GRASS library functions (from GIS
> Library, Vector Library, and Segment Library) are
> thread-safe or not? 
> 

Thread-safeness is quite new, and related to GUIs (they need to keep on 
being responsive when the actual program is doing useful work). Further, 
GRASS is Unix at base, where typically new discrete processes are forked 
when needed, rather than being sliced into threads. I think you can safely 
assume that GRASS library code is not thread-safe, because most of it was 
written before threads began to be important, because GRASS uses Unix 
conventions (creating new processes where needed), and because GUI in 
GRASS is an afterthought, not the design principle. Experience in other 
areas of scientific computing suggests that threads are a red herring when 
there is serious computing to be done.

Roger Bivand

Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no





More information about the grass-dev mailing list