It gives a convenience macro which checks if there is a transaction running
when the following code block is called. The idea is that since the code in
a transaction could be called a multiple times, you should not do things
like sending things on to the network or writing to a file during a
transaction. So what you should do is wrap any network/ InputOutput
operation in a io! macro. If you did that .. if you call this function
inside a transaction it would throw an exception.


On Sat, Dec 4, 2010 at 8:29 AM, ka <sancha...@gmail.com> wrote:

> This is a good question and I'm not sure of the right answer or if
> there is one. Personally, if I were exposing an API I would use the
> io! macro for sure. Even otherwise its a good convention to follow.
>
> On Nov 30, 9:06 am, Alex Baranosky <alexander.barano...@gmail.com>
> wrote:
> > Hi guys,
> >
> > I've recently discovered the io! macro.  Is this something to try to use
> all
> > the time.. or only in certain situations?
> >
> > Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to