Skip to content

_is_a関数の実装を検討する #14

Description

@Nobu19800

以下のnarrow関数について、本来は_is_a関数により変換可能かを確認する処理が必要だが、デッドロックの危険があるため以下のように実行しないようにしている。

static T * narrow(CORBA::Object_ptr ptr) {
if (!ptr) { return NULL; }
CORBA_Object impl = ptr.impl();
T * obj = new T(impl);
return obj;
if(obj->_is_a((const CORBA_char *)T::_type_code()->repository_id))
{
return obj;
}
else
{
return NULL;
}
}

RtORBはシングルスレッドのため、以下のようにnotify_connect関数呼び出し先でnarrow関数を実行するとデッドロックする。

https://github.com/OpenRTM/OpenRTM-aist/blob/e277814ad03cfa9af84e72eae118f8b9d41f59db/src/lib/rtm/CorbaConsumer.h#L459-L461

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions