Discussion:
[Firebird-odbc-devel] Safe thread?
Kjell Rilbe
2010-09-01 08:13:12 UTC
Permalink
Hi,

What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.

I can't see that it's documented in the online help.

Thanks,
Kjell
--
------------------------------
Kjell Rilbe
DataDIA AB
E-post: ***@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Kjell Rilbe
2010-09-02 11:20:13 UTC
Permalink
Hi,

What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.

I can't see that it's documented in the online help.

Thanks,
Kjell
--
------------------------------
Kjell Rilbe
DataDIA AB
E-post: ***@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Jorge Andrés Brugger
2010-09-16 15:47:45 UTC
Permalink
It´s for multi-thread apps, like Clarion ones, because fbclient is not
thread-safe (until FB 2.1, I think F 2.5 fbclient is thread-safe)

Regards
Post by Kjell Rilbe
Hi,
What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.
I can't see that it's documented in the online help.
Thanks,
Kjell
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
Kjell Rilbe
2010-09-16 16:22:17 UTC
Permalink
Thanks Jorge, but I'm sorry to say that your reply didn't tell me anything.

In what way does the option affect the behavior of the ODBC driver?
What, exactly, can be done in the "on" mode that can't be done in the
"off" mode? And vice versa? What are the pros and cons of each mode?

I know very weel what threading is about and how you write threaded
apps. I just don't know how this option affects the ODBC driver. I need
to know that, to be able to use it correctly in case I want to use
threads in my apps.

Thanks,
Kjell
Post by Jorge Andrés Brugger
It´s for multi-thread apps, like Clarion ones, because fbclient is not
thread-safe (until FB 2.1, I think F 2.5 fbclient is thread-safe)
Regards
Post by Kjell Rilbe
Hi,
What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.
I can't see that it's documented in the online help.
Thanks,
Kjell
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: ***@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Jorge Andrés Brugger
2010-09-16 16:40:41 UTC
Permalink
It's very simple: ODBC driver does what fbclient doesn't. You develop
multi-thread apps (meaning "one connect by thread", not "one connection,
multiple threads using same connection)? Check the box "safe thread".
You dont? Dont check that box.

Regards.
Post by Kjell Rilbe
Thanks Jorge, but I'm sorry to say that your reply didn't tell me anything.
In what way does the option affect the behavior of the ODBC driver?
What, exactly, can be done in the "on" mode that can't be done in the
"off" mode? And vice versa? What are the pros and cons of each mode?
I know very weel what threading is about and how you write threaded
apps. I just don't know how this option affects the ODBC driver. I need
to know that, to be able to use it correctly in case I want to use
threads in my apps.
Thanks,
Kjell
Post by Jorge Andrés Brugger
It´s for multi-thread apps, like Clarion ones, because fbclient is not
thread-safe (until FB 2.1, I think F 2.5 fbclient is thread-safe)
Regards
Post by Kjell Rilbe
Hi,
What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.
I can't see that it's documented in the online help.
Thanks,
Kjell
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
Kjell Rilbe
2010-09-17 03:41:19 UTC
Permalink
OK, so what it means is that with "Safe thread" off, I can't even use
one connection per thread? I was under the impression that fbclient *is*
thread safe provided you use seperate connection(s) for each thread. Is
this incorrect?

Thanks,
Kjell
Post by Jorge Andrés Brugger
It's very simple: ODBC driver does what fbclient doesn't. You develop
multi-thread apps (meaning "one connect by thread", not "one connection,
multiple threads using same connection)? Check the box "safe thread".
You dont? Dont check that box.
Regards.
Post by Kjell Rilbe
Thanks Jorge, but I'm sorry to say that your reply didn't tell me anything.
In what way does the option affect the behavior of the ODBC driver?
What, exactly, can be done in the "on" mode that can't be done in the
"off" mode? And vice versa? What are the pros and cons of each mode?
I know very weel what threading is about and how you write threaded
apps. I just don't know how this option affects the ODBC driver. I need
to know that, to be able to use it correctly in case I want to use
threads in my apps.
Thanks,
Kjell
Post by Jorge Andrés Brugger
It´s for multi-thread apps, like Clarion ones, because fbclient is not
thread-safe (until FB 2.1, I think F 2.5 fbclient is thread-safe)
Regards
Post by Kjell Rilbe
Hi,
What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.
I can't see that it's documented in the online help.
Thanks,
Kjell
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: ***@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Jorge Andrés Brugger
2010-09-17 16:18:26 UTC
Permalink
http://tech.dir.groups.yahoo.com/group/firebird-support/message/100655
Post by Kjell Rilbe
OK, so what it means is that with "Safe thread" off, I can't even use
one connection per thread? I was under the impression that fbclient *is*
thread safe provided you use seperate connection(s) for each thread. Is
this incorrect?
Thanks,
Kjell
Post by Jorge Andrés Brugger
It's very simple: ODBC driver does what fbclient doesn't. You develop
multi-thread apps (meaning "one connect by thread", not "one connection,
multiple threads using same connection)? Check the box "safe thread".
You dont? Dont check that box.
Regards.
Post by Kjell Rilbe
Thanks Jorge, but I'm sorry to say that your reply didn't tell me anything.
In what way does the option affect the behavior of the ODBC driver?
What, exactly, can be done in the "on" mode that can't be done in the
"off" mode? And vice versa? What are the pros and cons of each mode?
I know very weel what threading is about and how you write threaded
apps. I just don't know how this option affects the ODBC driver. I need
to know that, to be able to use it correctly in case I want to use
threads in my apps.
Thanks,
Kjell
Post by Jorge Andrés Brugger
It´s for multi-thread apps, like Clarion ones, because fbclient is not
thread-safe (until FB 2.1, I think F 2.5 fbclient is thread-safe)
Regards
Post by Kjell Rilbe
Hi,
What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.
I can't see that it's documented in the online help.
Thanks,
Kjell
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
Kjell Rilbe
2010-09-20 04:31:40 UTC
Permalink
Yes, but that only confirms that the client library is thread safe in
such a way that it works if you use separate connection(s) for each thread.

So, then what does the "safe thread" option in the odbc driver add?

Kjell
Post by Jorge Andrés Brugger
http://tech.dir.groups.yahoo.com/group/firebird-support/message/100655
Post by Kjell Rilbe
OK, so what it means is that with "Safe thread" off, I can't even use
one connection per thread? I was under the impression that fbclient *is*
thread safe provided you use seperate connection(s) for each thread. Is
this incorrect?
Thanks,
Kjell
Post by Jorge Andrés Brugger
It's very simple: ODBC driver does what fbclient doesn't. You develop
multi-thread apps (meaning "one connect by thread", not "one connection,
multiple threads using same connection)? Check the box "safe thread".
You dont? Dont check that box.
Regards.
Post by Kjell Rilbe
Thanks Jorge, but I'm sorry to say that your reply didn't tell me anything.
In what way does the option affect the behavior of the ODBC driver?
What, exactly, can be done in the "on" mode that can't be done in the
"off" mode? And vice versa? What are the pros and cons of each mode?
I know very weel what threading is about and how you write threaded
apps. I just don't know how this option affects the ODBC driver. I need
to know that, to be able to use it correctly in case I want to use
threads in my apps.
Thanks,
Kjell
Post by Jorge Andrés Brugger
It´s for multi-thread apps, like Clarion ones, because fbclient is not
thread-safe (until FB 2.1, I think F 2.5 fbclient is thread-safe)
Regards
Post by Kjell Rilbe
Hi,
What does the ODBC data source configuration option "safe thread" mean?
It's a checkbox down to the left.
I can't see that it's documented in the online help.
Thanks,
Kjell
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-odbc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel
.
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: ***@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Dimitry Sibiryakov
2010-09-20 07:41:35 UTC
Permalink
Post by Kjell Rilbe
So, then what does the "safe thread" option in the odbc driver add?
Every API call is serialized using mutex. So, if you call routines from different
threads they won't work in parallel.
--
SY, SD.
Kjell Rilbe
2010-09-20 08:03:17 UTC
Permalink
Post by Dimitry Sibiryakov
Post by Kjell Rilbe
So, then what does the "safe thread" option in the odbc driver add?
Every API call is serialized using mutex. So, if you call routines from different
threads they won't work in parallel.
Crystal clear! Thank you!

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: ***@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
Loading...