Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(649)

Issue 3077042: Remove block call in ibus-daemon, and use async call instead and clean up code. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by Peng Huang
Modified:
14 years ago
Reviewers:
shawn.p.huang, Yusuke Sato
CC:
satorux
Base URL:
git@github.com:/ibus/ibus.git@master
Visibility:
Public.

Description

Remove block call in ibus-daemon, and use async call instead and clean up code. 1. Do not use poll factory of a component. Sometime, it will cause a dead lock of ibus: ibus-daemon are waiting reply from engine, and engine are also waiting for reply from ibus-daemon. 2. Move some API from IBusComponent to BusComponent, Because of those API is for internal using only 3. Add a fake input context in server side to support switching input method when no context has focus. 4. Remove fake input context in imcontext, because we added the server side fake context BUG=none TEST=manual

Patch Set 1 #

Total comments: 25

Patch Set 2 : Fix problems in codereview #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1680 lines, -1010 lines) Patch
M bindings/vala/test/Makefile View 1 chunk +9 lines, -4 lines 0 comments Download
M bus/Makefile.am View 1 chunk +2 lines, -0 lines 0 comments Download
A bus/component.h View 1 chunk +73 lines, -0 lines 0 comments Download
A bus/component.c View 1 chunk +403 lines, -0 lines 0 comments Download
M bus/engineproxy.h View 1 chunk +6 lines, -3 lines 0 comments Download
M bus/engineproxy.c View 1 9 chunks +267 lines, -23 lines 0 comments Download
M bus/factoryproxy.h View 1 1 chunk +13 lines, -5 lines 0 comments Download
M bus/factoryproxy.c View 1 2 chunks +36 lines, -105 lines 0 comments Download
M bus/ibusimpl.c View 1 32 chunks +407 lines, -441 lines 0 comments Download
M bus/inputcontext.h View 1 chunk +15 lines, -1 line 0 comments Download
M bus/inputcontext.c View 13 chunks +206 lines, -45 lines 0 comments Download
M bus/main.c View 2 chunks +6 lines, -6 lines 0 comments Download
M bus/registry.h View 3 chunks +3 lines, -29 lines 0 comments Download
M bus/registry.c View 13 chunks +66 lines, -29 lines 0 comments Download
M client/gtk2/ibusimcontext.c View 8 chunks +1 line, -74 lines 0 comments Download
M debian/libibus-1.0-0.symbols View 1 2 chunks +4 lines, -7 lines 0 comments Download
M src/ibuscomponent.h View 1 2 chunks +1 line, -61 lines 0 comments Download
M src/ibuscomponent.c View 1 15 chunks +41 lines, -154 lines 0 comments Download
M src/ibusconfig.h View 3 chunks +74 lines, -2 lines 0 comments Download
M src/ibusconfig.c View 3 chunks +45 lines, -18 lines 0 comments Download
M src/ibusenginedesc.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/ibusproxy.h View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3
Peng Huang
14 years ago (2010-11-15 06:47:33 UTC) #1
Yusuke Sato
LGTM. Let's just submit it for now (after fixing some nits below). I'll take a ...
14 years ago (2010-11-15 08:35:02 UTC) #2
Peng
14 years ago (2010-11-16 01:14:58 UTC) #3
http://codereview.appspot.com/3077042/diff/1/bus/factoryproxy.c
File bus/factoryproxy.c (right):

http://codereview.appspot.com/3077042/diff/1/bus/factoryproxy.c#newcode73
bus/factoryproxy.c:73: #if 0
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> Please add a brief comment like:
> /* Remove bus_factory_proxy_create_engine function later */
> or something.
> 

Done.

http://codereview.appspot.com/3077042/diff/1/bus/factoryproxy.h
File bus/factoryproxy.h (right):

http://codereview.appspot.com/3077042/diff/1/bus/factoryproxy.h#newcode55
bus/factoryproxy.h:55: #if 0
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> Let's just remove the line 55-58 to keep the code clean.

Done.

http://codereview.appspot.com/3077042/diff/1/bus/ibusimpl.c
File bus/ibusimpl.c (right):

http://codereview.appspot.com/3077042/diff/1/bus/ibusimpl.c#newcode128
bus/ibusimpl.c:128: static void     bus_ibus_impl_add_component   (BusIBusImpl  
     *ibus,
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> can we remove this?
I removed _add_commponent, and think we could keep the set and get property
function. I plan to use it to replace some getter and setter function in future

http://codereview.appspot.com/3077042/diff/1/bus/ibusimpl.c#newcode128
bus/ibusimpl.c:128: static void     bus_ibus_impl_add_component   (BusIBusImpl  
     *ibus,
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> can we remove this?

Done.

http://codereview.appspot.com/3077042/diff/1/bus/ibusimpl.c#newcode614
bus/ibusimpl.c:614: (void)bus_registry_name_owner_changed (ibus->registry, name,
old_name, new_name);
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> nit: remove (void) ?

I am not sure if it will cause warning when compile with -Wall

http://codereview.appspot.com/3077042/diff/1/bus/ibusimpl.c#newcode614
bus/ibusimpl.c:614: (void)bus_registry_name_owner_changed (ibus->registry, name,
old_name, new_name);
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> nit: remove (void) ?

Done.

http://codereview.appspot.com/3077042/diff/1/bus/ibusimpl.c#newcode777
bus/ibusimpl.c:777: #if 0
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> How about adding a comment like:
> /* Remove _timeout_cb, _get_factory_proxy, and bus_ibus_impl_create_engine
> functions later. */

Done.

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.c
File src/ibuscomponent.c (right):

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.c#newcode227
src/ibuscomponent.c:227: component->priv->pid = 0;
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> please remove line 227 and 228.

Done.

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.c#newcode238
src/ibuscomponent.c:238: component->priv->verbose = FALSE;
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> ditto. please remove 238 and 239.

Done.

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.h
File src/ibuscomponent.h (right):

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.h#newcode99
src/ibuscomponent.h:99: gpointer pdummy[7];  // We can add 5 pointers without
breaking the ABI.
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> nit: the array size and the comment don't match.
> nit: is 7 correct? looks like you removed 4 members.

Done.

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.h#newcode310
src/ibuscomponent.h:310: #if 0
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> why #if 0?
I think this function is not necessary anymore. So remove it.

http://codereview.appspot.com/3077042/diff/1/src/ibuscomponent.h#newcode310
src/ibuscomponent.h:310: #if 0
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> why #if 0?

Done.

http://codereview.appspot.com/3077042/diff/1/src/ibusconfig.h
File src/ibusconfig.h (right):

http://codereview.appspot.com/3077042/diff/1/src/ibusconfig.h#newcode116
src/ibusconfig.h:116: * ibus_config_get_value_async:
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> Looks like a nice way (to workaround the process start-up issue we saw in the
> chromeos branch,) but I have a (silly) question:
> 
> What happens if we call the api in this way?
> 
> ibus_config_get_value_async("A");
> ibus_config_get_value_async("B");
> ibus_config_get_value_async_finish();  // which is returned? A or B

When you call _get_value_async, you should provide a callback function. You have
to call finish function in the callback function, and pass the GAsyncResult to
_finish. The GAsyncResult know which value should be returned.

http://codereview.appspot.com/3077042/diff/1/src/ibusconfig.h#newcode116
src/ibusconfig.h:116: * ibus_config_get_value_async:
On 2010/11/15 08:35:02, Yusuke Sato wrote:
> Looks like a nice way (to workaround the process start-up issue we saw in the
> chromeos branch,) but I have a (silly) question:
> 
> What happens if we call the api in this way?
> 
> ibus_config_get_value_async("A");
> ibus_config_get_value_async("B");
> ibus_config_get_value_async_finish();  // which is returned? A or B

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b