webyast/webyast — pull request #10 by lslezak (2012-10-09 16:08:57+00:00)
Title: Dbus locking

There are basically two things here:

- Better Dbus locking:

```ruby
begin
YastService.lock

ensure
YastService.unlock
end
```
replaced by
```ruby
DbusLock.synchronize { block }
```
(the ensure section was missing at some places, that could cause problem when an exception is raised)

- Disabled garbage collector (GC) when calling DBus introspection

DBus introspection sometimes failed (segfault resulting in "Bad Gateway" error), debugging in GDB revealed "object allocation during garbage collection phase error". Temporarily disabling GC fixes the crash.

It's rather a workaround (the proper fix would require much Ruby internals
knowledge and more time) but works for me.