Daniel,
Excellent!
Thanks for the quick reply.

Richard

On Wed, Jan 20, 2016 at 10:32 PM, Daniel Patterson <dan...@mapbox.com> wrote:
> Hi Richard,
>
>   Yes, it works, this is what osrm-routed does, there is only a single
> instance of the OSRM object shared between multiple threads:
>
> https://github.com/Project-OSRM/osrm-backend/blob/develop/src/tools/routed.cpp#L105
>
>   It works either with the internal facade, or the shared memory option.
>
> Daniel
>
> On Jan 20, 2016 8:25 PM, "Richard Marsden" <winw...@gmail.com> wrote:
>>
>> Is it possible to have multi-threaded (i.e. multiple simultaneous)
>> calls using the C++ library interface?
>>
>> E.g. with one "OSRM" object shared between the threads; or with
>> multiple OSRM objects, one per thread?
>>
>> Presumably the latter case would be memory hungry, but enabling
>> shared_memory in the libosrm_config would help...?
>>
>> The scenario I'm looking at would use the same road/graph files.
>>
>>
>>
>> Richard Marsden
>>
>> _______________________________________________
>> OSRM-talk mailing list
>> OSRM-talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>

_______________________________________________
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk

Reply via email to