PBC client doesn't stop
kdreibel at gmail.com
Tue Mar 29 14:36:50 EDT 2011
I know a System.exit() would work, but I always feel like that's overkill
for working around rogue threads. A shutdown/stop/close on the client would
be better, or mark the timer thread as a daemon thread like Kresten
On Tue, Mar 29, 2011 at 12:01 AM, Russell Brown <russell.brown at me.com>wrote:
> On 29 Mar 2011, at 03:17, Keith Dreibelbis wrote:
> > Hi riak-users,
> > I'm trying out the java protocol buffers client, and it works fine.
> However, it is preventing my process from exiting. When I used the http
> client from the same spot in code, the process exited, but switching to PBC
> caused it to hang on exit. Usually this behavior means there is a thread
> being spawned that is still running in the background. I wonder if there's
> a way to tell the PBC RiakClient that I'm done with it, and it can close? I
> don't see anything like that in the available methods.
> There is a Timer that shuts down any open and inactive sockets. It will
> stop if you issue a System.exit(0) at the end of your program. I could add
> an explicit "shutdown" method to the protocol buffers client, too.
> > Keith
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users