はやみずです

最近は締切が多くて口だけになっていてすいません。
たぶん月末までそんな感じです。


> 以前は描画済みかどうかを判別するためにbuffer内のstatusを
> 辿るときにgoto-char()でpointを移動させていました。
> 自動更新時にはtwittering-render-timeline()がsentinelから
> 呼ばれるのでユーザ操作のbackgroundで処理されると思うの
> ですが、この場合のpoint移動がどう解決されるかがよく
> 分かりません。

自分の理解では、sentinelの実行とユーザー操作によるコマンドの実行がパラ
レルになることは無いはずです。なので関数の呼び出しの間は、完全に他から
isolateされた環境で実行されていると考えてよいと思います。


> 2.timeline変更時に変更前と変更後のtimelineが混ざって
>   表示される

> 解決するにはsentinelで今取得したのはどのtimelineであるか
> が識別できれば良さそうです。spec,buffer,processの組み合わせを
> 管理する必要があると思います。

timeline-specごとにバッファを1つ作るようにすれば丸くおさまりそうですね。
前からやりたかったことでもあるので。


At Thu, 21 Jan 2010 02:18:50 +0900 (JST),
Tadashi MATSUO wrote:
> 
> 松尾です。
> 
> twittering-render-timeline()でまだ描画されていない
> statusのみを描画するように変更しましたが、色々問題が
> 起きているようです。すみません。
> 
> 1.(自動更新で)同じtweetが重複して表示される
>   (timeline最後尾のみ?)
> 2.timeline変更時に変更前と変更後のtimelineが混ざって
>   表示される
> 
> 以前は描画済みかどうかを判別するためにbuffer内のstatusを
> 辿るときにgoto-char()でpointを移動させていました。
> 自動更新時にはtwittering-render-timeline()がsentinelから
> 呼ばれるのでユーザ操作のbackgroundで処理されると思うの
> ですが、この場合のpoint移動がどう解決されるかがよく
> 分かりません。
> 
> ユーザ操作でtwittering-render-timeline()側で見えるpointも
> 移動してしまうとすると、描画済みかどうかの判定がずれて
> しまうので、なるべくpointは使わずに必要な描画を行う直前に
> だけgoto-charを行うよう変更してみました。
> 
> これで1.は解決…したかと思ったんですがまだ重複して
> 表示されるようです。毎回というわけではなく時々timelineの
> 最後尾が2重に表示されてしまいます。
> 
> 
> 2.の方については、timeline取得用プロセスのsentinelが
> 実行されると必ず
> twittering-last-requested-timeline-spec-stringの値で
> twittering-last-retrieved-timeline-spec-stringを更新
> するのが原因と思います。
> sentinel自身はどのtimelineを取得するためのプロセスなのかを
> 知らないので、旧timeline取得プロセスが動いている間に
> 新timelineへの移動が指示されると、混乱してしまいます。
> 
> 恐らく、次のような流れになっていると思われます。
> 
> 1.旧timeline自動取得指示
>   last-requested: 旧timeline
>   last-retrieved: 旧timeline
> 
> 2.新timeline取得指示
>   last-requested: 新timeline
>   last-retrieved: 旧timeline
> 
> 3.旧timeline取得完了
>   last-requested: 新timeline
>   last-retrieved: 旧timeline
>   →twittering-render-timeline()を新規描画モードで
>     呼び出す。(描画されるのは今取得した旧timeline)
>   →timeline取得に成功したのでlast-retrievedを
>     last-requestedの値で更新する
> 
>   last-requested: 新timeline
>   last-retrieved: 新timeline
> 
> 4.新timeline取得完了
>   last-requested: 新timeline
>   last-retrieved: 新timeline
>   →両者が同じなので追加描画モードで
>     twittering-render-timeline()を呼び出してしまう
>     (描画されるのは今取得した新timeline)
>   →混ざる
> 
> 解決するにはsentinelで今取得したのはどのtimelineであるか
> が識別できれば良さそうです。spec,buffer,processの組み合わせを
> 管理する必要があると思います。
> 
> ---
> 松尾 直志 <t...@mymail.twin.jp>
> 
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> twmode-users mailing list
> twmode-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/twmode-users

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
twmode-users mailing list
twmode-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/twmode-users

メールによる返信