What exactly is thread unsafe about Kryo?

763 views
Skip to first unread message

Evan Brodie

unread,
Jul 4, 2013, 10:40:48 AM7/4/13
to kryo-...@googlegroups.com
I know that is quite clear in both the docs and the Google Groups for Kryo that the Kryo library is not thread safe. However, I would like to know about exactly which components of Kryo makes it unsafe to share an instance per thread. What classes in the Kryo library cause conflicts during multi-threading? Any plans to make Kryo thread-safe?

Thank you.
Evan

Peter Veentjer

unread,
Oct 5, 2013, 2:18:23 AM10/5/13
to kryo-...@googlegroups.com
*kick*

Anyone?

I would like to initialize a Kryo object and share this between threads. The Input/Output will be created for each thread (for each call in my case). 

Oscar Boykin

unread,
Oct 5, 2013, 2:41:26 AM10/5/13
to kryo-...@googlegroups.com
Check out chill and the KryoPool:


Designed to deal with exactly this issue.
--
You received this message because you are subscribed to the "kryo-users" group.
http://groups.google.com/group/kryo-users
---
You received this message because you are subscribed to the Google Groups "kryo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kryo-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


--
Oscar Boykin :: @posco :: http://twitter.com/posco

Nate

unread,
Oct 5, 2013, 8:07:15 AM10/5/13
to kryo-users
Kryo holds state about the current serialization/deserialization so it can't be used by multiple threads. Obviously Input and Output are also not thread safe.

-Nate



--
Reply all
Reply to author
Forward
0 new messages