Changeset 4445 for trunk/integration

Show
Ignore:
Timestamp:
08/24/08 08:18:54 (5 months ago)
Author:
pmoura
Message:

Improved performance of multi-threading applications (specially on MacOS X) when using SWI-Prolog as the back-end compiler by making the lookup caches thread local.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/integration/logtalk_comp_swi.pl

    r4411 r4445  
    2222:- op(200,  fy,  @). 
    2323:- op(200,  fy,  -). 
     24:- if(current_prolog_flag(threads, true)). 
     25    :- thread_local('$lgt_obj_lookup_cache_'/4). 
     26    :- thread_local('$lgt_self_lookup_cache_'/4). 
     27    :- thread_local('$lgt_super_lookup_cache_'/5). 
     28    :- thread_local('$lgt_super_lookup_cache_'/6). 
     29    :- thread_local('$lgt_db_lookup_cache_'/5). 
     30:- endif. 
    2431:- include('../compiler/logtalk.pl').