concurrent reads -- thread safe

70 views
Skip to first unread message

satish varagani

unread,
May 6, 2015, 3:28:46 AM5/6/15
to concurr...@googlegroups.com
Hi

whether map in concurrency kit is thread safe in terms of read??  I wrote a cache service using concurrency kit,  It works in serial calls , but it is giving inconsistent performance while doing concurrent rerquests.

satish varagani

unread,
May 6, 2015, 3:33:19 AM5/6/15
to concurr...@googlegroups.com

small clarification. Map means hash table

Paul Khuong

unread,
May 6, 2015, 7:32:09 AM5/6/15
to concurr...@googlegroups.com
On Wed, May 6, 2015 at 3:28 AM, satish varagani
<satish....@gmail.com> wrote:
> whether map in concurrency kit is thread safe in terms of read??

ck_ht supports SPMC concurrency: there must be at most one writer, but
an arbitrary number of concurrent readers (even with an ongoing write)
is allowed.

> I wrote a
> cache service using concurrency kit, It works in serial calls , but it is
> giving inconsistent performance while doing concurrent rerquests.

I can't guess what you mean by "inconsistent performance" nor do I see
how it relates to your initial question on thread safety. If you do
observe inconsistent reads, perhaps your application doesn't
manipulate the data stored in ck_ht safely.

Paul Khuong
Reply all
Reply to author
Forward
0 new messages