Re: Accessing Java members, from Clojure

2013-04-09 Thread Cedric Greevey
On Tue, Apr 9, 2013 at 5:00 PM, Timothy Washington wrote: > > Now, this works, but I'm always open to a better idea. In clojure-land, 1) > there's a thread constantly checking for new events on the list and 2) > there will be a thread of execution for each eventID. So I'm trying to come > up with t

Re: Accessing Java members, from Clojure

2013-04-09 Thread Timothy Washington
Hey thanks for all the feedback. So I got a working solution, bits and pieces of this solution online. Cedric mentioned it, but basically, I'm having my java code call a clojure function that (via STM), pushes new event objects to a list in Clojure (fig.1). And with my Clojure code in place, my Ja

Re: Accessing Java members, from Clojure

2013-04-09 Thread Cedric Greevey
On Tue, Apr 9, 2013 at 12:41 PM, Timothy Washington wrote: > Hi all, > > I have a polyglot project, comprising of a little Java and mostly Clojure > code. The Java class is a concrete callback for an external library. There > will be sub-second firing of that callback, and event map objects will g

Re: Accessing Java members, from Clojure

2013-04-09 Thread Gary Verhaegen
I'm not really sure I understand what you want to do here. If you want to access a Java class from Clojure, you can access it directly with the dot notation. If you are concerned about concurrency between your Java code and your Clojure code, this is no different from any concurrency in Java : you

Re: Accessing Java members, from Clojure

2013-04-09 Thread Cedric Greevey
On Tue, Apr 9, 2013 at 12:41 PM, Timothy Washington wrote: > Hi all, > > I have a polyglot project, comprising of a little Java and mostly Clojure > code. The Java class is a concrete callback for an external library. There > will be sub-second firing of that callback, and event map objects will g

Accessing Java members, from Clojure

2013-04-09 Thread Timothy Washington
Hi all, I have a polyglot project, comprising of a little Java and mostly Clojure code. The Java class is a concrete callback for an external library. There will be sub-second firing of that callback, and event map objects will get pushed onto a list. >From Clojure, I need to access that list in