← Back to team overview

mosquitto-users team mailing list archive

Re: Mosquitto client mosquitto_start

 

Hi Remi,

Sounds reasonable, I'll have a look about how to expose the interface best.

The dummypthread.h file is for the broker, it defines all of the
pthread functions as empty macros to allow their use without lots of
#ifdef WITH_THREADING guards.

Cheers,

Roger


On Mon, Dec 9, 2013 at 2:45 PM, Remi SALEMBIER <remi.salembier@xxxxxxx> wrote:
> Hi,
>
>
>
> I am currently using the Mosquitto Client in a multi-threading mode. So I am
> not using mosquitto_loop but the mosquitto_loop_start / mosquitto_loop_stop
> functions.
>
> I have noticed that everytime the client is running the memory consumption
> is increased by 8MB. This is the default space allocated by pthread_create
> (called by the mosquitto_loop_start function) for each new thread. It is
> possible to decrease this allocated space by putting an attribute
> (pthread_attr_t) when calling the pthread_create function. Currently this
> parameter is set to NULL and it does not seem possible to modify it. I have
> noticed there is a dummypthread.h file with “#define pthread_create(A, B, C,
> D)” but I am not sure if it can be used for customization.
>
>
>
> Regards,
>
> Remi
>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>


References