Re: patch: tiny patch to correct stringbuffer size estimate

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: patch: tiny patch to correct stringbuffer size estimate
Дата
Msg-id 20030722142807.GH11354@opencloud.com
обсуждение исходный текст
Ответ на Re: patch: tiny patch to correct stringbuffer size estimate  (Felipe Schnack <felipes@ritterdosreis.br>)
Ответы Re: patch: tiny patch to correct stringbuffer size estimate  (Felipe Schnack <felipes@ritterdosreis.br>)
Список pgsql-jdbc
On Tue, Jul 22, 2003 at 11:20:11AM -0300, Felipe Schnack wrote:

>   These StringBuffer woes remember of an old request we made to this
>   list... The last time I checked driver's sources, all acess to
>   preparedstatement's stringbuffer are synchronized... this isn't
>   necessary as jre's Stringbuffer already has all of its methods
>   synchronized. The driver is still doing that? Just curious.

Yes, but to be threadsafe with a shared buffer you do need to synchronize as
the driver does a series of operations to accumulate a string that need to
be atomic. Synchronizing on each individual operation isn't enough.

That said, it's pretty silly to write code that depends on a Statement being
threadsafe :)

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dmitry Tkach
Дата:
Сообщение: Re: the IN clause saga
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Re: Detecting 'socket errors' - closing the Connection object