Re: Libification project (SoC)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/17/07, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:

We are talking about libgit. Which should make access to certain common
functions on Git repositories easy. Nothing more than that.


Fair enough.

If you need to do that asynchronously, do _not_ fiddle with libgit. Just
imagine what this would involve: you'd have to have timeouts (since there
is _NO_ other way to find out when to return with empty hands, instead of
blocking), which is _not_ portable. You'd soon be in the same _mess_ we
are talking about with respect to exceptions.

Also, you would make _all_ operations expensive, since they _would_ have
to store state to be restartable.

The common solution for your problem _is_ to use threads.


I would say, the common solution to have non blocking libgit is to use
threads in the tool linked with libgit.

This is clearly a  design choice and I agree it's an important
statement to keep libgit simple and portable (otherwise you'd probably
need to use a thread library as pthread in libgit). Thread facility in
Qt is instead already portable and well integrated. Anyway it's a
design choice perhaps worth documenting.

And you have to admit that _only_ viewers would need asynchronous access
anyway. I doubt that other tools -- which could take their advantage of a
libgit -- would need such an access.


Yes, and you have to admit ;-)  that viewers are the tools that mostly
will use libgit.

   Marco
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]